﻿@model PerformanceAssessment.Models.Meeting
@{
    ViewBag.Title = "Meeting";
}

@section Head
{
    <style type="text/css">
        .required
        {
            min-width:700px;
            font:inherit;
        }
        
        .description
        {
            min-width:700px;
            height:250px;
            font:inherit;
        }
        
        #hours, #minutes
        {
            width:40px;
        }
    </style>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/ui.spinner.min.js")" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            $("#date").datepicker({ dateFormat: "mm/dd/yy" }).datepicker("setDate", new Date());
            $("#hours").spinner({ min: 0, max: 23, increment: 'fast' });
            $("#minutes").spinner({ min: 0, max: 59, increment: 'fast' });
            $("#hours, #minutes").spinner("option", "format", function (number, places, element) {
                return (number < 10 ? '0' : '') + number;
            });
        });
    </script>
}

<h2>Schedule a Meeting</h2>

@using (Html.BeginForm("Meeting", "Assessments", FormMethod.Post))
{
    <div>
        <div class="display-label">
            Attendants:</div>
        <div class="display-field">
            @Html.TextBox("Attendants", null, new { @class="required" })
            @Html.ValidationMessageFor(model => model.Attendants)
        </div>
        <div class="display-label">
            Date/Time:</div>
        <div class="display-field">
            <input type="text" id="date" name="date" style="width:120px;" />
            <input type="text" id="hours" name="hours" />
            <input type="text" id="minutes" name="minutes"/>
            Duration:
            @Html.TextBox("Duration")
            minutes
            @Html.ValidationMessageFor(model => model.Date)
            @Html.ValidationMessageFor(model => model.Hours)
            @Html.ValidationMessageFor(model => model.Minutes)
            @Html.ValidationMessageFor(model => model.Duration)
        </div>
        <div class="display-label">
            Location:</div>
        <div class="display-field">
            @Html.TextBox("Location")
        </div>
        <div class="display-label">
            Subject:</div>
        <div class="display-field">
            @Html.TextBox("Subject", null, new { @class="required" })
        </div>
        <div class="display-label">
            Description:</div>
        <div class="display-field">
            @Html.TextArea("Description", new { @class="description" })
        </div>
        <input type="submit" value="Schedule meeting" />
    </div>    
}

<p>
    @Html.ActionLink("Back to Assessment", "Details", new { assessmentId = ViewBag.assessmentId })
</p>

